<template>
  <div>
    <el-row :gutter="5" type="flex" style="flex-wrap: wrap">
      <el-form ref="elForm" :model="dataForm" class="self-supervise-form" :rules="rules" size="small" label-width="120px" label-identity="right" :disabled="setting.readonly" v-loading="loading">
        <el-col :span="24">
          <el-form-item label-width="0">
            <groupTitle content-position="left" content="校区督导信息"></groupTitle>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-alert class="commitment-alert" type="warning" title="重要提示" show-icon :closable="false">
            <el-form-item label-width="0" prop="commitment" style="margin-bottom:0">
              <el-checkbox v-model="dataForm.commitment">
                <strong>承诺声明：</strong> 本人已认真核对本表各项信息，承诺所填内容真实、完整，与实际情况一致，本人对填写内容的真实性负责。
              </el-checkbox>
            </el-form-item>
          </el-alert>
        </el-col>
        <el-col :span="8">
          <el-form-item label="校区品牌" prop="brand">
            <el-select v-model="dataForm.brand" placeholder="请选择签约品牌" filterable clearable required :style="{ width: '100%' }">
              <el-option :key="item.id" :label="item.fullName" :value="item.enCode" v-for="item in brandOptions" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="督导校区" prop="campusId">
            <el-select v-model="dataForm.campusId" placeholder="请选择"  filterable clearable required :style="{ width: '100%' }">
              <el-option v-for="(item, index) in campusOptions" :key="index" :label="item.fullName" :value="item.id"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="督导类型" prop="type">
            <el-select v-model="dataForm.type" placeholder="请选择" clearable :style="{ width: '100%' }" filterable>
              <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" :value="item.id"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="督导师" prop="counselor">
            <user-select v-model="dataForm.counselor" placeholder="请选择" clearable required :style="{ width: '100%' }"></user-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="督导时间" prop="pickerDate">
            <el-date-picker v-model="dataForm.pickerDate" :style="{ width: '100%' }" @change="handlePickerDateChange" type="datetimerange" value-format="timestamp" format="yyyy-MM-dd HH:mm" start-placeholder="开始时间" end-placeholder="结束时间" clearable required></el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="开业时间">
            <span>{{ custom.dateFormat(dataItem.openDate, 'YYYY-MM-DD') }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="校区学位">
            <span>{{ dataItem.degreeCount }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="校区床位">
            <span>{{ dataItem.bedCount }}</span>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="老师人数" prop="teacherCount">
            <el-input-number v-model="dataForm.teacherCount" :min="1" label="老师人数"></el-input-number>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="学生人数" prop="studentCount">
            <el-input-number v-model="dataForm.studentCount" :min="1" label="学生人数"></el-input-number>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="督导检核表" prop="summarize">
            <div class="s-div"><span class="s-tips">请上传对校区的亮点及不足方面的督导检核文件</span></div>
            <el-button type="text" @click="templateDownload('summarize')">下载模板</el-button>
            <custom-upload-fz type="summarize" v-model="dataForm.summarize" :fileSize="500" required sizeUnit="MB" :limit="9" buttonText="点击上传文件" :style="{ width: '300px' }" @input="handleSubmit"></custom-upload-fz>
          </el-form-item>
        </el-col>
        <!-- <el-col :span="24">
          <el-form-item label="检核表" prop="checklist">
            <custom-upload-fz type="checklist" v-model="dataForm.checklist" :fileSize="500" sizeUnit="MB" :limit="9"
              buttonText="点击上传">
            </custom-upload-fz>
          </el-form-item>
        </el-col> -->
        <el-col :span="24">
          <el-form-item label="督导照片" prop="sparkle" class="f-s-item">
            <div class="s-div">
              <span class="s-tips">上传督导校区的亮点三好照片（上传图片1-9张）</span>
            </div>

            <el-form-item class="f-s-c-item">
              <div class="f-s-c-div">
                <el-input v-model="dataForm.sparkleMemo" type="textarea" :rows="2" placeholder="请输入内容"></el-input>
                <custom-upload-img type="sparkle" v-model="dataForm.sparkle" :fileSize="500" sizeUnit="MB" :limit="9"></custom-upload-img>
              </div>
            </el-form-item>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="督导照片" prop="lack" class="f-s-item">
            <div class="s-div">
              <span class="s-tips">上传督导校区的不足二改照片（上传图片1-9张）</span>
            </div>
            <el-form-item class="f-s-c-item">
              <div class="f-s-c-div">
                <el-input v-model="dataForm.lackMemo" type="textarea" :rows="2" placeholder="请输入内容"></el-input>
                <custom-upload-img type="lack" v-model="dataForm.lack" :fileSize="500" sizeUnit="MB" :limit="9"></custom-upload-img>
              </div>
            </el-form-item>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="改进方案" prop="improve">
            <div class="s-div"><span class="s-tips">请上传与校区达成一致的具体改进方案</span></div>
            <!-- <el-link type="primary">下载模版</el-link> -->
            <custom-upload-fz type="improve" v-model="dataForm.improve" :fileSize="500" sizeUnit="MB" :limit="9" buttonText="点击上传文件" :style="{ width: '300px' }"></custom-upload-fz>
          </el-form-item>
        </el-col>
        
        <el-col :span="24">
          <el-form-item label-width="0">
            <groupTitle content-position="left" content="校区综合评价"></groupTitle>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item style="display:flex;" prop="cooperate">
            <template slot="label">
              <el-tag effect="dark">校区规范性</el-tag>
            </template>
            <span>校区流程标准</span>
            <el-rate v-model="cooperate1" :colors="colors" @change="setCurrentValue"></el-rate>
            <span style="margin-left:20px">校区环创布置</span>
            <el-rate v-model="cooperate2" :colors="colors" @change="setCurrentValue"></el-rate>
            <span style="margin-left:20px">校区安全规范</span>
            <el-rate v-model="cooperate3" :colors="colors" @change="setCurrentValue"></el-rate>
            <template v-if="dataForm.id == '' || cooperate4 !== 0">
              <span style="margin-left:20px">物资规范</span>
              <el-rate v-model="cooperate4" :colors="colors" @change="setCurrentValue"></el-rate>
            </template>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item style="display:flex;" prop="team">
            <template slot="label">
              <el-tag effect="dark">团队执行力</el-tag>
            </template>
            <span>负责人管理能力</span>
            <el-rate v-model="team1" :colors="colors" @change="setCurrentValue"></el-rate>
            <span style="margin-left:20px">团队精神面貌</span>
            <el-rate v-model="team2" :colors="colors" @change="setCurrentValue"></el-rate>
            <span style="margin-left:20px">班级管理能力</span>
            <el-rate v-model="team3" :colors="colors" @change="setCurrentValue"></el-rate>
            <template v-if="dataForm.id == '' || team4 !== 0">
              <span style="margin-left:20px">总部学习同频</span>
              <el-rate v-model="team4" :colors="colors" @change="setCurrentValue"></el-rate>
            </template>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item style="display:flex;" prop="profit">
            <template slot="label">
              <el-tag effect="dark">招生营销力</el-tag>
            </template>
            <span>校区招生满员</span>
            <el-rate v-model="profit1" :colors="colors" @change="setCurrentValue"></el-rate>
            <span style="margin-left:20px">服务项目多元</span>
            <el-rate v-model="profit2" :colors="colors" @change="setCurrentValue"></el-rate>
            <template v-if="profit3 !== 0 && dataForm.id != ''">
              <span style="margin-left:20px">团队市场意识</span>
              <el-rate v-model="profit3" :colors="colors" @change="setCurrentValue"></el-rate>
            </template>
          </el-form-item>
        </el-col>

        <el-col :span="24">
          <el-form-item label="综合评分" prop="score">
            <span>{{ dataForm.score == 0 ? 10 : dataForm.score }}</span>
          </el-form-item>
        </el-col>
      </el-form>
    </el-row>
  </div>
</template>
<script>
export { default } from './index.js'
</script>
<style scoped>
.commitment-alert {
  margin-bottom: 10px;
}
.commitment-alert :deep(.el-alert__title) {
  font-weight: 700;
}
.commitment-alert :deep(.el-alert__content) {
  line-height: 1.6;
}
.el-time-spinner__wrapper {
  width: 100% !important;
}
@import url(index.scss);
</style>
